<?php
namespace app\install\controller;
use app\admin\service\UpdateService;
use app\agent\service\AdminUserService;

class Index
{
    public function index()
    {

        $lockPath = dirname(__FILE__) .DS . 'install.lock';
        if(!file_exists($lockPath)){

            //更新数据库
            UpdateService::installSql(8888);
			
            file_put_contents($lockPath,time());

            echo ' install ok ;' ;
        }else{
            echo ' install no ;' ;
        }



    }
}
